BiblioteQ

A Library Application

Document Version 1.18

 

Table of Contents

Introduction

Accessing an Existing SQLite Database

Adding an Item

Administrator Browser

BiblioteQ.INI

BiblioteQ.conf

Change Password

Connecting to a PostgreSQL Database

Creating a PostgreSQL Database

Creating an SQLite Database

Custom Query

Database Content

Database Enumerations Browser

Disconnecting from a Database

Document Changes

Version 1.00

Version 1.01

Version 1.02

Version 1.03

Version 1.04

Version 1.05

Version 1.06

Version 1.07

Version 1.08

Version 1.09

Version 1.10

Version 1.11

Version 1.12

Version 1.13

Version 1.14

Version 1.15

Version 1.16

Version 1.17

Version 1.18

Error Log

Exporting a Table View to a CSV File

File Attachments

Hyperlinks

Importing

Limitations

Main Window Tool Buttons

Members Browser

Member’s Reservation History

Operating Systems

PDF

PostgreSQL Accounts

PostgreSQL Benefits

PostgreSQL unaccent()

Preparing biblioteq.conf

Requesting an Item

Reserving an Item

SQL Injections

Returning an Item

SRU & Z39.50

Translations

Upgrading a PostgreSQL Database Schema

Upgrading an SQLite Database Schema

 

Introduction

BiblioteQ is a complex, highly-configurable, and mature library application. The software supports large, medium, and small institutions. Personal libraries are also supported.

BiblioteQ should be functional on any operating system where Qt 5 LTS and newer, SQLite, and YAZ are supported. BiblioteQ also supports the PostgreSQL database engine. Qt 4.8.x is considered obsolete and is not supported.

The source of BiblioteQ is available at https://github.com/textbrowser/biblioteq.

The purpose of this document is to detail the functionality of BiblioteQ. Installation instructions are not described in this document. Please refer to the Administrator Guide document for installation information.

 

Accessing an Existing SQLite Database

An existing SQLite database file may be opened via two methods. The first method involves the Recent SQLite Files option of the File menu.

 

The Recent SQLite Files sub-menu contains a list of BiblioteQ’s recently-accessed SQLite files. If an SQLite file is selected, the specified SQLite database is opened. Please note that BiblioteQ will first close an existing database, if one is open, before opening the specified database. A Clear option is also included in the sub-menu. If Clear is activated, the list of the recently-accessed SQLite files is emptied. BiblioteQ will remove duplicate sqlite_db_ entries from the INI file shortly after the application is launched. Also removed will be entries whose corresponding files lack read and write permissions.

The second method of accessing an SQLite database is through the Branch Selection dialog. The dialog may be accessed via the Connect option of the File menu.

 

After opening the Branch Selection dialog, select local_db as the Branch Name. This will prepare the dialog for accessing SQLite databases. Afterwards, click on the Select SQLite Database button to launch a file-selection dialog.

Adding an Item

For PostgreSQL databases, items may be added by administrator and librarian accounts. For SQLite databases, file owners may add items.

BiblioteQ supports books, compact discs, digital video discs, grey literature, journals, magazines, photograph collections, and video games.

To add an item, click on the Add Item tool button and select the desired category. A Create window will be displayed. Required fields are highlighted.

Multiple items may be added simultaneously.

 

Administrator Browser

The Administrator Browser is available if an administrator role is connected to a PostgreSQL database. The browser may be accessed via the Configure Administrator Privileges tool button.

Four roles are available. Changes must be committed via the Save Changes button.

The process of committing changes to the PostgreSQL database is as follows:

  1. 1.The table’s current state is inspected. The operator is notified of administrators without privileges as well as duplicate administrators and the process is aborted. 

  2. 2.A database transaction is prepared. If an error occurs, the process is aborted. 

  3. 3.Deleted accounts are removed from the admin database table as well as from the PostgreSQL database. If an error occurs with either sub-process, the process is aborted and the previous changes are reverted. 

  4. 4.Existing admin table entries are updated. New accounts are inserted into the admin table. If an error occurs, the process is aborted and the previous changes are reverted. 

  5. 5.Existing admin table entries are granted the specified privileges after all potential privileges are revoked. New accounts are created in the PostgreSQL database and assigned the appropriate privileges. If an error occurs, the process is aborted and the previous changes are reverted. 

  6. 6.If all of the aforementioned statements execute correctly, the transaction is committed. 

Please note that leading and trailing spaces will be removed from user names during the database-recording process.

 

BiblioteQ.INI

The BiblioteQ.INI file contains interface settings. The file resides in the user’s home directory within the .biblioteq folder. Editing should be performed with care.

BiblioteQ.conf

The BiblioteQ.conf file contains Amazon, SRU, Z39.50, and other information. Please edit this file using a text editor.

Change Password

A PostgreSQL account’s password may be changed via the Password Selection dialog. A password must contain at least eight characters. Guest accounts are excluded.

 

Connecting to a PostgreSQL Database

 
BiblioteQ supports both the PostgreSQL and the SQLite database engines. This section will cover the details involved in connecting to a PostgreSQL database.
 

Click the Connect option of the File menu.

 

Select the appropriate non-local_db Branch Name if one is available. Provide the Password and Userid information, if applicable, and press the Connect button.

Note: The sections Accessing an Existing SQLite Database and Creating an SQLite Database cover the details of accessing and creating SQLite databases, respectively.

 

Creating a PostgreSQL Database

BiblioteQ supports PostgreSQL 8.x, 9.x, and newer. Please note that PostgreSQL 8.x has reached its end of life. Please follow the PostgreSQL-provided documentation for installing PostgreSQL. After installing the required PostgreSQL packages, please perform the following operations:

  1. 1.Create the xbook_db database via createdb xbook_db -E UTF8 or via the PostgreSQL-recommended procedure. Please note that the database name xbook_db is only a suggestion. 

  2. 2.Execute createlang plpgsql -d xbook_db or the PostgreSQL-recommended procedure for adding a new programming language to the xbook_db database. 

  3. 3.If desired, replace all instances of the default administrator xbook_admin in the postgresql_create_schema.sql file. 

  4. 4.Log into your PostgreSQL xbook_db database and load the postgresql_create_schema.sql file via \i postgresql_create_schema.sql. 

 

Creating an SQLite Database

A new BiblioteQ SQLite database file may be created via the New SQLite Database option of the File menu.

 

After the option is selected, a file-selection dialog is displayed. An existing or a new file may be specified. A confirmation dialog is displayed if an existing file is selected.

Once the SQLite database file has been initialized, BiblioteQ will open it. If a database is already open,  a confirmation prompt is displayed. If confirmed, the current database is closed and the newly-created database is opened.

 

Custom Query

Custom SQL queries may be performed via the Custom Query window.

After a successful query is performed, the main table’s columns will be set according to the query statement. Please void including columns of type QByteArray in the custom query as the associated data will burden the software.

 

Database Content

All content, save for configuration values, is stored in the respective database. For instance, image data are stored in a database. Temporary data reside in the application’s memory space.

 

Database Enumerations Browser

The Database Enumerations Browser is available to accounts having administrator or librarian privileges and is accessible via the Database Enumerations tool button. The browser contains configurable item values.

The process of committing changes to a database is as follows:

  1. 1.For each sub-panel (Book Binding Types, etc.), a database transaction is prepared. If an error occurs, the process iterates to the next sub-panel. 

  2. 2.All items in the respective database table are deleted. For example, for the Book Binding Types sub-panel, all entries from the book_binding_types database table are deleted. If the process fails, changes are reverted and the process proceeds to the next sub-panel. 

  3. 3.New values are inserted into the respective database table. If the process fails, changes are reverted and the process proceeds to the next sub-panel. 

  4. 4.The current database transaction is committed. 

 

Disconnecting from a Database

To disconnect from a connected database, click the File menu. Then click the Disconnect option.

 

Document Changes

Version 1.00

Version 1.01

Version 1.02

Version 1.03

Version 1.04

Version 1.05

Version 1.06

Version 1.07

Version 1.08

Version 1.09

Version 1.10

Version 1.11

Version 1.12

Version 1.13

Version 1.14

Version 1.15

Version 1.16

Version 1.17

Version 1.18

 

Error Log

The Error Log may be accessed via the View menu. The window details critical exceptions which were raised during a BiblioteQ session. The status bar of the main window will indicate whether or not the log contains entries.

 

Exporting a Table View to a CSV File

The current table view’s contents may be exported to a CSV file via the Export Table View as CSV option of the File menu.

 

If clicked, a file-selection dialog is displayed.

The generated CSV file will contain comma-separated values. Values which contain commas will be encased in double-quotes. For example, A book of abstract algebra,"Pinter, Charles C.",McGraw-Hill,1990-01-01,New York,2,"Algebra, Abstract.",English,0070501386,0.00,Dollar,1,Hardcover,Home,9780070501386,89035355,QA162 .P56 1990,512/.02,1,0,Original,As New,.

The first line of the generated file contains the exported view’s header strings. The exported columns are governed by the settings in Viewable Columns.

 

File Attachments

Several categories (books, grey literature, journals, magazines) include file attachments. Attached files are compressed before being inserted into the respective database. BiblioteQ utilities the ZLIB algorithm for compression.

 

Hyperlinks

BiblioteQ supports embedded hyperlinks when accessing PostgreSQL databases. If a hyperlink is clicked, a search is initiated using the specified text for the given category. Please note that a clicked hyperlink will not be activated if the parent widget is editable.

 

Importing

BiblioteQ provides an import mechanism for importing book data contained in a CSV file. Please review the Tools menu.

 

Limitations

BiblioteQ does not impose limits on the data content. Please note that both PostgreSQL and SQLite have rigid limits. Please read https://www.sqlite.org/limits.html for SQLite details.

Generally:

 

Main Window Tool Buttons

This page will describe the various tool buttons which are present on the main window.

The tool buttons are described from left to right.

View Selected Item(s)

Open the detail window(s) of the selected item(s). A confirmation prompt is displayed if the number of selected items exceeds four. The tool button is disabled if the current account has administrator privileges.

Add Item

Add an item. The tool button is disabled if the current account does not have Item Creation privileges.

Duplicate Selected Item(s)

Open the detail window(s) of the selected item(s). A confirmation prompt is displayed if the number of selected items exceeds four. The tool button is disabled if the current account does not have Item Creation privileges.

Delete Selected Item(s)

Delete the selected item(s). A confirmation prompt is displayed. The tool button is disabled if the current account does not have Item Deletion privileges.

Modify Selected Item(s)

Modify the selected item(s). A confirmation prompt is displayed if the number of selected items exceeds four. The tool button is disabled if the current account does not have Item Updates privileges.

Print Current View

Print the items in the current view. A Print dialog is displayed.

Select Viewable Columns

Select the columns that are to be shown in the main window’s table per each category (books, cds, etc.). Please note that column order is not preserved.

View Member’s Reservation History (Patrons Only)

Display the current patron’s reserved items. The tool button is enabled only for patron accounts.

Request Selected Item(s) / Cancel Selected Request(s)

Available for patrons, these options allow for the requesting of items as well as for the canceling of requested items.

Reserve Selected Item

Reserve the selected item. The tool button is disabled if the current account does not have Item Reservations privileges.

Display Members Browser

Display the Members Browser window. Only available for administrator, circulation, and membership accounts.

Files Browser

Display the Files Browser window.

Database Search

Activates a context menu containing various search options.

Custom Database Query

Display the Custom Query window.

Refresh Table

Reload the current view.

 

Again, the tool buttons are described from left to right.

Connect

Display the Branch Selection dialog.

Disconnect

Disconnect from the current database.

Change Password

Display the Password Selection dialog. Not available for PostgreSQL guest accounts and SQLite databases.

Configure Administrator Privileges

Display the Administrator Browser window. Only available for administrator accounts.

Database Enumerations

Display the Database Enumerations Browser window. Only available for administrator and librarian accounts.

Exit BiblioteQ

Terminate the application.

 

Members Browser

The Members Browser is available off of the View menu. For PostgreSQL databases, the browser is accessible if the current role is administrator, circulation, or membership. For SQLite databases, access to the browser is always available.

The browser allows administrators to create, delete, and modify patron account details. Reservation processes are also available in the Members Browser. A mechanism for exporting the listed members is also included.

Grant Privileges

Grant Privileges is available for PostgreSQL databases. If pressed, each listed account is removed from and added to the biblioteq_patron role.

 

Member’s Reservation History

A patron’s reservation history may be accessed via the Member’s Reservation History window. Reservation histories are initially disabled.

 

Operating Systems

BiblioteQ supports Android, FreeBSD, Linux, Mac OS X, OS/2, OpenBSD, and Windows. Generally, the application should be compatible with any operating system where Qt, SQLite, and YAZ are supported. Please note that the YAZ library is totally optional. The software has also been tested on a variety of architectures, including AMD, ARM, Alpha 21264, PowerPC, and Sun UltraSparc.

 

PDF

BiblioteQ supports PDF content through the Poppler open source library. Browsing, printing, and searching options are included. Support is optional.

 

PostgreSQL Accounts

BiblioteQ provides three tiers of PostgreSQL database roles: administrator, guest, and patron.

Initially, the postgresql_create_schema.sql script may be used to create the administrator account xbook_admin.

Guest roles are provided a read-only interface. Patron roles are granted reservation permissions.

PostgreSQL accounts may be modified via the Administrator Browser. Please note that the Administrator Browser is only available within an administrator role.

Additionally, there are four administrator levels: Administrator, Circulation, Librarian, and Membership. The abilities of each level is described next.
 

Administrator permissions:

Circulation permissions:

Librarian permissions:

Membership permissions:

 

PostgreSQL Benefits

PostgreSQL is an open-source relational database management system. Some of the benefits of PostgreSQL include:

 

PostgreSQL unaccent()

BiblioteQ supports PostgreSQL's unaccent() extension. Documentation describing the unaccent() function is located at https://www.postgresql.org/docs/current/unaccent.html.

Greek-language users may wish to supplement their unaccent.rules files with information contained at https://gist.github.com/marinoszak/7d5d6a8670faae0f4589c2da988f2ba3. The PostgreSQL database may require restarting after a rules file is altered.

 

Preparing biblioteq.conf

The biblioteq.conf file contains non-user settings. The location of the file varies with distribution. This page will describe the various properties which may be defined in the biblioteq.conf file.

[Amazon Back Cover Images]

Describes required settings for retrieving book back-cover images from amazon.com.

host

Host name of the Amazon image server.

path

Path of the image file. BiblioteQ substitutes the respective ISBN in the percent sign. Please note that ASINs may also work.

The optional properties proxy_host, proxy_password, proxy_port, proxy_type, and proxy_username are also supported. The proxy_type property supports values of HTTP, None, Socks5, and System.

[Amazon Front Cover Images]

Describes required settings for retrieving book front-cover images from amazon.com.

host

Host name of the Amazon image server.

path

Path of the image file. BiblioteQ substitutes the respective ISBN in the percent sign. Please note that ASINs may also work.

The optional properties proxy_host, proxy_password, proxy_port, proxy_type, and proxy_username are also supported. The proxy_type property supports values of HTTP, None, Socks5, and System.

[Branch-1]

The first database branch.

connection_options

PostgreSQL-specific connection options. An example is connect_timeout=10;sslmode=verify-full.

database_name

The name of the database as it will appear in the Branch Selection dialog.

database_type

The database’s type. Must be set to postgresql or sqlite.

hostname

The host name of the PostgreSQL database server. Both IP addresses and fully-qualified domain names may be assigned.

port

The port value of the PostgreSQL database server.

ssl_enabled

If false, SSL/TLS communications are disabled.

[Open Library]

Describes required settings for retrieving book information from openlibrary.org

url_isbn

URL of book. BiblioteQ substitutes the respective ISBNs.

[Open Library Cover Images]

Describes required settings for retrieving book cover images from covers.openlibrary.org.

back_url

URL of the back-cover image file. BiblioteQ substitutes the respective ISBN in the $value field.

front_url

URL of the front-cover image file. BiblioteQ substitutes the respective ISBN in the $value field.

[SRU-1]

Describes the first SRU site.

name

Name of the site as it will appear in the application.

url_isbn

Complete URL of the site for retrieving data via ISBNs. The tokens %1 and %2 are replaced by the ISBN-10 and ISBN-13 fields.

url_issn

Complete URL of the site for retrieving data via ISSNs. The token %1 is replaced by the ISSN field.

The optional properties proxy_host, proxy_password, proxy_port, proxy_type, and proxy_username are also supported. The proxy_type property supports values of HTTP, None, Socks5, and System.

[Z39.50-1]

Describes the first Z39.50 site. Please also see http://www.indexdata.com/yaz/doc/zoom.records.html.

database_name

The remote database name.

format

Render format. An example: marc8,utf-8.

name

Name of the site as it will appear in the application.

port

The remote database’s port number.

record_syntax

Preferred record syntax. Example: MARC21.

The optional properties password, proxy_host, proxy_port, and username are also supported.

 

Requesting an Item

PostgreSQL patrons may request one or more books, compact discs, digital video discs, grey literature, journals, magazines, and video games. After selecting an item, please press the green Telephone tool button. To cancel a request, please set the Category to All Requested, select the desired item, and press the red Telephone tool button. A confirmation dialog is displayed and if accepted, the selected request is canceled.

 

Reserving an Item

For PostgreSQL databases, items may be reserved by administrator and circulation accounts. Owners of SQLite databases may reserve items. Books, compact discs, digital video discs, grey literature, journals, magazines, and video games may be reserved. To reserve an item, select it in the main window and press the Reserve Selected Item tool button. If the item is available for reservation, the Members Browser will be displayed. Select the desired patron in the Members Browser and press the Reserve Selected Item tool button in the Members Browser.  The Copy Browser dialog is displayed. Specify the Due Date and select the desired copy. Finalize the reservation process by clicking the Reserve button.

Please note that the default Due Date may be modified via the Database Enumerations Browser.

 

SQL Injections

Most BiblioteQ queries are parameterized. Prepared SQL statements are resilient against SQL injections. Please note that some fixed fields (for instance, Locations) are embedded in the statements.

 

Returning an Item

For PostgreSQL databases, reserved items may be returned by administrator and circulation accounts. Owners of SQLite databases may return reserved items. The simplest method of identifying reserved items is by the All Reserved category of the View menu. An item may be returned via its details window. Open the selected item’s details and click the Reservation Status button. The Item Reservation Status dialog is displayed. Select the copy which is about to be returned and click the Return button. Confirm the process.

 

SRU & Z39.50

BiblioteQ supports both the SRU and Z39.50 Internet search queries for books, journals, and magazines. Sites may be defined within the biblioteq.conf file.

 

Translations

Translations are incomplete. Translating BiblioteQ text is quite simple. Please download and install Qt from https://download.qt.io, download BiblioteQ’s source, and familiarize yourself with Qt’s Linguist. Linguist documentation is available at https://doc.qt.io/qt-5/qtlinguist-index.html.

Literal text, for example text housed in a combination-box widget, will be recorded to a database in its translated form. In general, BiblioteQ does not translate database entries.

 

Upgrading a PostgreSQL Database Schema

Some software releases require database schema changes. Please read the version-specific section of the postgresql_update_schema.sql file and execute the required SQL statements.

 

Upgrading an SQLite Database Schema

It may be necessary to upgrade an existing BiblioteQ SQLite database schema after a software release. An upgrade tool is available off of the Tools menu. A confirmation prompt is displayed before the process is initiated. After the upgrade process is completed, a dialog depicting abnormalities will be displayed. Please create a backup of the SQLite database before upgrading it.

 
 
Index

Index

21264        32

Accessing an Existing SQLite Database        11

Add Item        6, 27

admin        7

administrator        6p., 16, 27pp., 34, 42, 44

Administrator        34

Administrator Browser        7, 28, 34

Administrator Guide        4

All Requested        41

All Reserved        44

Alpha        32

AMD        32

Android        19, 32

ARM        32

ASIN        18

ASINs        38

back_url        39

biblioteq_patron        30

biblioteq.conf        38, 45

BiblioteQ.conf        9, 20

BiblioteQ.INI        8, 20

Book Binding Types        16

books        6, 23, 41, 45

Books        42

Branch Name        5, 11

Branch Selection        5, 28, 38

Category        41

Change Password        28

circulation        28, 30, 42, 44

Circulation        34

Clear        5

compact discs        6, 41p.

Configure Administrator Privileges        7, 18, 28

Connect        5, 11, 28

connection_options        38

Copy Browser        42

Create        6

createdb        12

createlang        12

Creating an SQLite Database        11

CSV        22, 25

Custom Database Query        28

Custom Query        14

Database Enumerations        16, 29

Database Enumerations Browser        16, 29, 42

Database Search        28

database_name        38, 40

database_type        39

Delete Selected Item(s)        27

digital video discs        6, 41p.

Disconnect        17, 28

Display Members Browser        28

Due Date        42

Duplicate Selected Item(s)        27

Error Log        21

Exit BiblioteQ        29

Export Table View as CSV        22

File        5, 11, 13, 17, 22

Files Browser        28

format        40

FreeBSD        32

front_url        39

Grant Privileges        30

grey literature        6, 23, 41p.

guest        28, 34

host        38

hostname        39

HTTP        38, 40

hyperlinks        24

Hyperlinks        18

Item Creation        27, 34p.

Item Deletion        27, 34p.

Item Reservation Status        44

Item Reservations        28, 34p.

Item Returns        34p.

Item Updates        27, 35

journals        6, 23, 41p., 45

librarian        6, 16, 29

Librarian        34

LIMIT        26

Linguist        46

Linux        32

local_db        5, 11

Mac OS X        32

magazines        6, 23, 41p., 45

Member Creation        35

Member Deletion        35

Member Updates        35

Member’s Reservation History        31

Members Browser        18, 42

membership        28, 30

Membership        34

Modify Selected Item(s)        27

name        39p.

New SQLite Database        13

None        38, 40

OFFSET        26

Open Library        18

OpenBSD        32

OS/2        32

Pagination        26

password        10, 40

Password        11

Password Selection        10, 28

path        38

patron        27, 34

patrons        41

PDF        33

photograph collections        6

plpgsql        12

Poppler        33

port        39p.

postgresql        39

PostgreSQL        4, 6p., 11p., 26, 30, 34, 41p., 44

postgresql_create_schema.sql        12, 34

postgresql_update_schema.sql        47

PowerPC        32

Print Current View        27

proxy_host        38, 40

proxy_password        38, 40

proxy_port        38, 40

proxy_type        38, 40

proxy_username        38, 40

Qt        32, 46

Qt 5 LTS        4

Qt 6.2 LTS        20

Recent SQLite Files        5

record_syntax        40

Refresh Table        28

Request Selected Item(s) / Cancel Selected Request(s)        27

Reservation Histories        35

Reservation Status        44

Reserve        42

Reserve Selected Item        28, 42

Save Changes        7

Select SQLite Database        5

Select Viewable Columns        27

Socks5        38, 40

SQL injections        18

sqlite        39

SQLite        4pp., 11, 13, 26, 30, 32, 48

SRU        45

ssl_enabled        39

Sun UltraSparc        32

System        38, 40

Telephone        41

Tools        18, 25, 48

Translations        46

unaccent()        18

unaccent()        37

upgrade        48

url_isbn        39

url_issn        39

Userid        11

username        40

video games        6, 41p.

View        21, 30, 44

View Member’s Reservation History (Patrons Only)        27

View Selected Item(s)        27

Windows        32

xbook_admin        12, 34

xbook_db        12

YAZ        4, 32

Z39.50        45

 Administrator Privileges        7

[Amazon Back Cover Images]        38

[Amazon Front Cover Images]        38

[Branch-1]        38

[Open Library Cover Images]        39

[Open Library]        39

[SRU-1]        39

[Z39.50-1]        40